package com.lykj.modules.shop.wrapper;

import com.lykj.core.mp.support.BaseEntityWrapper;
import com.lykj.core.tool.utils.BeanUtil;
import com.lykj.modules.shop.entity.StoreCalendar;
    import com.lykj.modules.shop.vo.StoreCalendarVO;
import java.util.Objects;

/**
 * 红包日历记录包装类,返回视图层所需的字段
 *
 * @author cxl
 * @since 2022-03-29
 */
public class StoreCalendarWrapper extends BaseEntityWrapper<StoreCalendar, StoreCalendarVO>  {

	public static StoreCalendarWrapper build() {
		return new StoreCalendarWrapper();
 	}

	@Override
	public StoreCalendarVO entityVO(StoreCalendar storeCalendar) {
		StoreCalendarVO storeCalendarVO = Objects.requireNonNull(BeanUtil.copy(storeCalendar, StoreCalendarVO.class));

		//User createUser = UserCache.getUser(storeCalendar.getCreateUser());
		//User updateUser = UserCache.getUser(storeCalendar.getUpdateUser());
		//storeCalendarVO.setCreateUserName(createUser.getName());
		//storeCalendarVO.setUpdateUserName(updateUser.getName());

		return storeCalendarVO;
	}

}
